//
//  Extension+UILabel.swift
//  WeiBoDemo
//
//  Created by China Dragon on 2023/8/25.
//

import UIKit

extension UILabel{
    
    /// 便利构造函数
    ///  - parameter title
    ///  - parameter fontSzie 默认 14 号字体
    ///  - parameter color 默认 UIColor.darkGray
    ///  - return :  UILabel
    convenience init(title: String, fontSzie: CGFloat = 14, color: UIColor = UIColor.darkGray){
        self.init()
        text = title
        textColor = color
        font = UIFont.systemFont(ofSize: fontSzie)
        
        numberOfLines = 0// 允许换行, 还需要指定宽高
        textAlignment = NSTextAlignment.center //文字居中
    }
}
